package DiErZhou.Day1;

import java.util.Scanner;

public class Day1_5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数字：");
        int a= scanner.nextInt();
        boolean flag=true;
        for (int n = 2; n<a; n++) {
          if (a%n==0) {
              flag=false;
          }
        }
        if (flag){
            System.out.println("这个数是素数");
        }
        else{
            System.out.println("这个数不是素数");
        }
    }
}
